<?php
/**
 * Test a Survey - Main Screen
 * 
 * @author	Xavier VILAIN
 * @package Nawa\Survey
 * @license #license-nawa-survey#
 * 
 */
use Fox\Generator;
use Fox\Html\Button;
use Fox\Html\Screen;
$xview = Xview::instance();
$survey = $xview->component('survey','object');
$screen = new Screen('surveyTest');
$screen->toolbar()->add(new Button('back',Generator::url('survey','update',null,array('surveyid' => $survey->surveyid))));
echo $screen->display();
echo '<h1>'.$survey->label().'</h1>';
echo $survey->render();

/*
$data['anwsers'][] = array('label' => 'Yes','language' => 'en','value' => 'Y');
$data['anwsers'][] = array('label' => 'No','language' => 'en','value' => 'N');
$data['anwsers'][] = array('label' => 'NA','language' => 'en','value' => 'NA');
$data['anwsers'][] = array('label' => 'Oui','language' => 'fr','value' => 'Y');
$data['anwsers'][] = array('label' => 'Non','language' => 'fr','value' => 'N');
$data['anwsers'][] = array('label' => 'N/A','language' => 'fr','value' => 'NA');
echo json_encode($data);
*/